<%@ taglib prefix="paging" uri="paging-taglib" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>我的钱包-提现申请</title>
    <script>
        $(function($){
            //填充省份下拉选
            $.getJSON("${ctx}/areas/getAreasList/null", function(json){
                //alert("JSON Data: " +json);
                //alert(json.length);
                for(var i in json){
                    //alert(json[i].areaName);
                    $("#addrProvinceCode").append("<option value='"+json[i].areaCode+"'>"+json[i].areaName+"</option>");
                }
            });
            //省份发生改变时，填充市级下拉选
            $("#addrProvinceCode").change(function () {
                //填充发货地省市名
                $("#addrProvinceName").val($("#addrProvinceCode option:selected").text());
                $("#addrCityCode option").remove();
                $("#addrCityCode").append("<option value='0'>"+"请选择所在城市"+"</option>");
                var selectTmp=$("#addrProvinceCode").val();
                if(selectTmp!=0){
                    $.getJSON("${ctx}/areas/getAreasList/"+selectTmp, function(json){
                        for(var i in json){
                            //alert(json[i].areaName);
                            $("#addrCityCode").append("<option value='"+json[i].areaCode+"'>"+json[i].areaName+"</option>");}
                    });
                }
            });
            //市发生改变时
            $("#addrCityCode").change(function () {
                //填充市级名
                $("#addrCityName").val($("#addrCityCode option:selected").text());
            });
            $("#form_submit").click(function(){
//                alert("提交动作");
                $("#product_form").submit();
            });
        });
    </script>
    <script>
    function up(){
    //console.log("up");
    var txt = $('#myTxt').val();
    //console.log(txt);
    var bool = isNaN(txt);
    //console.log(bool);
    if(bool){
    alert("你输入的不是数字，请重新输入：");
    }
    }
    </script>
    <%--<script>--%>
        <%--var cashWithdrawalAmount = document.getElementById("cashWithdrawalAmount");--%>
            <%--if(cashWithdrawalAmount.value<${user.accountBalance}){--%>

        <%--}--%>
    <%--</script>--%>
</head>
<body>
<c:choose>
    <c:when test="${result==1}">
        <div class="i_prompt" style="padding:100px 0 50px 250px;">
            <div class="mt">
                <i class="ico-30 c3001-ico"></i><span class="c-FF0000">提现申请提交成功</span>
            </div>
            <div class="mc">
                <p class="p-b5">感谢您的支持，我们马上为您安排审核。</p>
                <a href="${ctx}/user/withdraw">返回我的钱包</a>
            </div>
        </div>
    </c:when>
    <c:otherwise>
<div class="navigation">
    <div class="crumbs ">
        <i class="tm-iconfont icon-info"></i>
        <a href="${ctx}/main">卖家中心</a><span>&gt;</span><a href="${ctx}/user/account_details">我的钱包</a><span>&gt;</span>提现申请
    </div>
    <div class="help">
        <a href="#" target="_blank">卖家交易学习专区</a>
    </div>
</div>
<div class="c oh">
    <!--star 关键统计-->
    <div class="mtc_box line-all b-F5F5F5">
        <div class="mt line-bottom p-lr10 fs14">钱包简报</div>
        <!--mc star-->
        <div class="mc b-FFFFFF p10">
            <ul class="u_keyStat ukt_2 tac fs14 p-tb30">
                <li>
                    <div class="item">
                        <div class="c-666666 fwb">${user.accountBalance}</div>
                        <div>账户余额</div>
                    </div>
                </li>
                <li>
                    <div class="item">
                        <div class="c-666666 fwb">${user.accountBalance}</div>
                        <div>可提现金额</div>
                    </div>
                </li>
                <li>
                    <div class="item not_item">
                        <div class="c-666666 fwb">10000</div>
                        <div>总销售额</div>
                    </div>
                </li>
            </ul>
        </div>
        <!--mc end-->
    </div>
    <!--end 关键统计-->
    <!--star 选项统计-->
    <div class="mtc_tab m-t10">
        <div class="mt">
            <a class="curr" href="javascript:;">提现申请</a>
        </div>
                 <form:form modelAttribute="UserWithdrawalsRecordModel" action="${ctx}/user/withdraw" method="post" id="product_form">
        <div class="mc">
            <!--star 提现申请-->
            <div class="u_tableform p20 line-all m-t20">
                <div class="item">
                    <label class="label tar">提现金额：</label>${ere}
                    <div class="cont_txt">
                        <form:input path="cashWithdrawalAmount"  type="number" cssClass="text w240"  placeholder="提现金额："  ></form:input>
                        <form:errors path="cashWithdrawalAmount" cssClass="text w240"></form:errors>
                    </div>
                </div>
                <div class="item">
                    <label class="label tar">银行开户姓名：</label>
                    <div class="cont_txt">
                        <form:input path="accountName" type="text" cssClass="text w240" value="" placeholder="银行开户姓名："  ></form:input>
                        <form:errors path="accountName" cssClass="text w240"></form:errors>
                        <%--<input type="text" class="text w240" />--%>
                    </div>
                </div>
                <div class="item">
                    <label class="label tar">开户银行：</label>
                    <div class="cont_txt">
                        <form:input path="bank" type="text" cssClass="text w240" value="" placeholder="开户银行："  ></form:input>
                        <form:errors path="bank" cssClass="text w240"></form:errors>
                        <%--<input type="text" class="text w240" />--%>
                    </div>
                </div>
                <div class="item">
                    <label class="label tar">开户所在地：</label>
                    <div class="cont_txt">
                        <form:select path="addrProvinceCode" class="text w125 m-r10">
                            <form:option value="">请选择所在省份</form:option>
                        </form:select>
                        <form:select path="addrCityCode" class="text w125">
                            <form:option value="">请选择所在城市</form:option>
                        </form:select>
                    </div>
                    <form:errors path="addrProvinceCode" cssClass="text w240"></form:errors>
                    <form:errors path="addrCityCode" cssClass="text w240"></form:errors>
                </div>
                <div class="item">
                    <label class="label tar">支行：</label>
                    <div class="cont_txt">
                        <form:input path="branch" type="text" cssClass="text w240" value="" placeholder="支行："  ></form:input>
                        <form:errors path="branch" cssClass="text w240"></form:errors>
                        <%--<input type="text" class="text w240" />--%>
                    </div>
                </div>
                <div class="item">
                    <label class="label tar">银行卡号：</label>
                    <div class="cont_txt">
                        <form:input path="cardNo" type="text" cssClass="text w240" value="" placeholder="银行卡号："  ></form:input>
                        <form:errors path="cardNo" cssClass="text w240"></form:errors>
                        <%--<input type="text" class="text w240" />--%>
                    </div>
                </div>
                <div class="item">
                    <label class="label tar">&nbsp;</label>
                    <div class="cont_txt">
                        <button id="form_submit" class="i_btn u2 p-lr50">提&nbsp;&nbsp;交</button>
                    </div>
                </div>
            </div>
            <!--end 提现申请-->
        </div>
    </form:form>
    </div>

</div>
</c:otherwise>
    </c:choose>
</body>
</html>

